]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
workspace: Animate opening new windows while in overview
authorJonas Dreßler <verdre@v0yd.nl>
Wed, 3 Jun 2020 16:32:45 +0000 (18:32 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 6 Jul 2020 21:16:15 +0000 (23:16 +0200)
Use the pivot point and scale to animate in new windows which are opened
while the overview is shown.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1305

js/ui/workspace.js

index 182f350ae9a8b2f8166087d33664fe83c988ad0a..dd7dacbeea0e2a3aae96c12b2a9e937fe08f2a75 100644 (file)
@@ -953,7 +953,17 @@ class Workspace extends St.Widget {
             return;
         }
 
-        this._addWindowClone(metaWin);
+        const clone = this._addWindowClone(metaWin);
+
+        clone.set_pivot_point(0.5, 0.5);
+        clone.scale_x = 0;
+        clone.scale_y = 0;
+        clone.ease({
+            scale_x: 1,
+            scale_y: 1,
+            duration: 250,
+            onStopped: () => clone.set_pivot_point(0, 0),
+        });
 
         if (this._layoutFrozenId > 0) {
             // If a window was closed before, unfreeze the layout to ensure